{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Azure Kubernetes Service (AKS) Deep MNIST\n",
    "In this example we will deploy a tensorflow MNIST model in the Azure Kubernetes Service (AKS).\n",
    "\n",
    "This tutorial will break down in the following sections:\n",
    "\n",
    "1) Train a tensorflow model to predict mnist locally\n",
    "\n",
    "2) Containerise the tensorflow model with our docker utility\n",
    "\n",
    "3) Send some data to the docker model to test it\n",
    "\n",
    "4) Install and configure Azure tools to interact with your cluster\n",
    "\n",
    "5) Use the Azure tools to create and setup AKS cluster with Seldon\n",
    "\n",
    "6) Push and run docker image through the Azure Container Registry\n",
    "\n",
    "7) Test our Elastic Kubernetes deployment by sending some data\n",
    "\n",
    "#### Let's get started! 🚀🔥\n",
    "\n",
    "## Dependencies:\n",
    "\n",
    "* Helm v2.13.1+\n",
    "* A Kubernetes cluster running v1.13 or above (minkube / docker-for-windows work well if enough RAM)\n",
    "* kubectl v1.14+\n",
    "* az CLI v2.0.66+\n",
    "* Python 3.6+\n",
    "* Python DEV requirements\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1) Train a tensorflow model to predict mnist locally\n",
    "We will load the mnist images, together with their labels, and then train a tensorflow model to predict the right labels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From <ipython-input-1-559b63ab8b48>:2: read_data_sets (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use alternatives such as official/mnist/dataset.py from tensorflow/models.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:260: maybe_download (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please write your own downloading logic.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:252: _internal_retry.<locals>.wrap.<locals>.wrapped_fn (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use urllib or similar directly.\n",
      "Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:262: extract_images (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use tf.data to implement this functionality.\n",
      "Extracting MNIST_data/train-images-idx3-ubyte.gz\n",
      "Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:267: extract_labels (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use tf.data to implement this functionality.\n",
      "Extracting MNIST_data/train-labels-idx1-ubyte.gz\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:110: dense_to_one_hot (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use tf.one_hot on tensors.\n",
      "Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.\n",
      "Extracting MNIST_data/t10k-images-idx3-ubyte.gz\n",
      "Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.\n",
      "Extracting MNIST_data/t10k-labels-idx1-ubyte.gz\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py:290: DataSet.__init__ (from tensorflow.contrib.learn.python.learn.datasets.mnist) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use alternatives such as official/mnist/dataset.py from tensorflow/models.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.cast instead.\n",
      "WARNING:tensorflow:From /home/alejandro/miniconda3/envs/reddit-classification/lib/python3.7/site-packages/tensorflow/python/util/tf_should_use.py:193: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.\n",
      "Instructions for updating:\n",
      "Use `tf.global_variables_initializer` instead.\n",
      "0.915\n"
     ]
    }
   ],
   "source": [
    "from tensorflow.examples.tutorials.mnist import input_data\n",
    "mnist = input_data.read_data_sets(\"MNIST_data/\", one_hot = True)\n",
    "import tensorflow as tf\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    \n",
    "    x = tf.placeholder(tf.float32, [None,784], name=\"x\")\n",
    "\n",
    "    W = tf.Variable(tf.zeros([784,10]))\n",
    "    b = tf.Variable(tf.zeros([10]))\n",
    "\n",
    "    y = tf.nn.softmax(tf.matmul(x,W) + b, name=\"y\")\n",
    "\n",
    "    y_ = tf.placeholder(tf.float32, [None, 10])\n",
    "\n",
    "    cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1]))\n",
    "\n",
    "    train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy)\n",
    "\n",
    "    init = tf.initialize_all_variables()\n",
    "\n",
    "    sess = tf.Session()\n",
    "    sess.run(init)\n",
    "\n",
    "    for i in range(1000):\n",
    "        batch_xs, batch_ys = mnist.train.next_batch(100)\n",
    "        sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys})\n",
    "\n",
    "    correct_prediction = tf.equal(tf.argmax(y,1), tf.argmax(y_,1))\n",
    "    accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))\n",
    "    print(sess.run(accuracy, feed_dict = {x: mnist.test.images, y_:mnist.test.labels}))\n",
    "\n",
    "    saver = tf.train.Saver()\n",
    "\n",
    "    saver.save(sess, \"model/deep_mnist_model\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2) Containerise the tensorflow model with our docker utility"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First you need to make sure that you have added the .s2i/environment configuration file in this folder with the following content:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MODEL_NAME=DeepMnist\r\n",
      "API_TYPE=REST\r\n",
      "SERVICE_TYPE=MODEL\r\n",
      "PERSISTENCE=0\r\n"
     ]
    }
   ],
   "source": [
    "!cat .s2i/environment"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now we can build a docker image named \"deep-mnist\" with the tag 0.1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "---> Installing application source...\n",
      "---> Installing dependencies ...\n",
      "Looking in links: /whl\n",
      "Requirement already satisfied: tensorflow>=1.12.0 in /usr/local/lib/python3.6/site-packages (from -r requirements.txt (line 1)) (1.13.1)\n",
      "Requirement already satisfied: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.0.9)\n",
      "Requirement already satisfied: gast>=0.2.0 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (0.2.2)\n",
      "Requirement already satisfied: absl-py>=0.1.6 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (0.7.1)\n",
      "Requirement already satisfied: astor>=0.6.0 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (0.7.1)\n",
      "Requirement already satisfied: keras-applications>=1.0.6 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.0.7)\n",
      "Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.12.0)\n",
      "Requirement already satisfied: termcolor>=1.1.0 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.1.0)\n",
      "Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.19.0)\n",
      "Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (0.33.1)\n",
      "Requirement already satisfied: tensorboard<1.14.0,>=1.13.0 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.13.1)\n",
      "Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.16.2)\n",
      "Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (3.7.0)\n",
      "Requirement already satisfied: tensorflow-estimator<1.14.0rc0,>=1.13.0 in /usr/local/lib/python3.6/site-packages (from tensorflow>=1.12.0->-r requirements.txt (line 1)) (1.13.0)\n",
      "Requirement already satisfied: h5py in /usr/local/lib/python3.6/site-packages (from keras-applications>=1.0.6->tensorflow>=1.12.0->-r requirements.txt (line 1)) (2.9.0)\n",
      "Requirement already satisfied: markdown>=2.6.8 in /usr/local/lib/python3.6/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow>=1.12.0->-r requirements.txt (line 1)) (3.0.1)\n",
      "Requirement already satisfied: werkzeug>=0.11.15 in /usr/local/lib/python3.6/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow>=1.12.0->-r requirements.txt (line 1)) (0.15.0)\n",
      "Requirement already satisfied: setuptools in /usr/local/lib/python3.6/site-packages (from protobuf>=3.6.1->tensorflow>=1.12.0->-r requirements.txt (line 1)) (40.8.0)\n",
      "Requirement already satisfied: mock>=2.0.0 in /usr/local/lib/python3.6/site-packages (from tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow>=1.12.0->-r requirements.txt (line 1)) (2.0.0)\n",
      "Requirement already satisfied: pbr>=0.11 in /usr/local/lib/python3.6/site-packages (from mock>=2.0.0->tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow>=1.12.0->-r requirements.txt (line 1)) (5.1.3)\n",
      "Url '/whl' is ignored. It is either a non-existing path or lacks a specific scheme.\n",
      "You are using pip version 19.0.3, however version 19.1.1 is available.\n",
      "You should consider upgrading via the 'pip install --upgrade pip' command.\n",
      "Build completed successfully\n"
     ]
    }
   ],
   "source": [
    "!s2i build . seldonio/seldon-core-s2i-python36:0.13 deep-mnist:0.1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3) Send some data to the docker model to test it\n",
    "We first run the docker image we just created as a container called \"mnist_predictor\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9087047e368ac8f285e1f742704b4c0c7bceac7d29ee90b3b0a6ef2d61ebd15c\r\n"
     ]
    }
   ],
   "source": [
    "!docker run --name \"mnist_predictor\" -d --rm -p 5000:5000 deep-mnist:0.1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Send some random features that conform to the contract"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "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\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Expected label:  7.0 . One hot encoding:  [[0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]]\n"
     ]
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "# This is the variable that was initialised at the beginning of the file\n",
    "i = [0]\n",
    "x = mnist.test.images[i]\n",
    "y = mnist.test.labels[i]\n",
    "plt.imshow(x.reshape((28, 28)), cmap='gray')\n",
    "plt.show()\n",
    "print(\"Expected label: \", np.sum(range(0,10) * y), \". One hot encoding: \", y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "LABEL 0:\t 0.0064 %\n",
      "LABEL 1:\t 0.0000 %\n",
      "LABEL 2:\t 0.0155 %\n",
      "LABEL 3:\t 0.2862 %\n",
      "LABEL 4:\t 0.0003 %\n",
      "LABEL 5:\t 0.0027 %\n",
      "LABEL 6:\t 0.0000 %\n",
      "LABEL 7:\t 99.6643 %\n",
      "LABEL 8:\t 0.0020 %\n",
      "LABEL 9:\t 0.0227 %\n"
     ]
    }
   ],
   "source": [
    "from seldon_core.seldon_client import SeldonClient\n",
    "import math\n",
    "import numpy as np\n",
    "\n",
    "# We now test the REST endpoint expecting the same result\n",
    "endpoint = \"0.0.0.0:5000\"\n",
    "batch = x\n",
    "payload_type = \"ndarray\"\n",
    "\n",
    "sc = SeldonClient(microservice_endpoint=endpoint)\n",
    "\n",
    "# We use the microservice, instead of the \"predict\" function\n",
    "client_prediction = sc.microservice(\n",
    "    data=batch,\n",
    "    method=\"predict\",\n",
    "    payload_type=payload_type,\n",
    "    names=[\"tfidf\"])\n",
    "\n",
    "for proba, label in zip(client_prediction.response.data.ndarray.values[0].list_value.ListFields()[0][1], range(0,10)):\n",
    "    print(f\"LABEL {label}:\\t {proba.number_value*100:6.4f} %\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "mnist_predictor\r\n"
     ]
    }
   ],
   "source": [
    "!docker rm mnist_predictor --force"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4) Install and configure Azure tools "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "First we install the azure cli - follow specific instructions at https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "!curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Configure the azure CLI so it can talk to your server \n",
    "(if you are getting issues, make sure you have the permmissions to create clusters)\n",
    "\n",
    "You must run this through a terminal and follow the instructions:\n",
    "```\n",
    "az login\n",
    "```\n",
    "\n",
    "Once you are logged in, we can create our cluster. Run the following command, it may take a while so feel free to get a ☕."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%%bash \n",
    "# We'll create a resource group\n",
    "az group create --name SeldonResourceGroup --location westus\n",
    "# Now we create the cluster\n",
    "az aks create \\\n",
    "    --resource-group SeldonResourceGroup \\\n",
    "    --name SeldonCluster \\\n",
    "    --node-count 1 \\\n",
    "    --enable-addons monitoring \\\n",
    "    --generate-ssh-keys\n",
    "    --kubernetes-version 1.13.5"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once it's created we can authenticate our local `kubectl` to make sure we can talk to the azure cluster:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!az aks get-credentials --resource-group SeldonResourceGroup --name SeldonCluster"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And now we can check that this has been successful by making sure that our `kubectl` context is pointing to the cluster:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!kubectl config get-contexts"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Install Seldon Core"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Before we install seldon core, we need to install HELM\n",
    "For that, we need to create a ClusterRoleBinding for us, a ServiceAccount, and then a RoleBinding"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "clusterrolebinding.rbac.authorization.k8s.io/kube-system-cluster-admin created\r\n"
     ]
    }
   ],
   "source": [
    "!kubectl create clusterrolebinding kube-system-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "serviceaccount/tiller created\r\n"
     ]
    }
   ],
   "source": [
    "!kubectl create serviceaccount tiller --namespace kube-system"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "clusterrolebinding.rbac.authorization.k8s.io/tiller-role-binding created\r\n"
     ]
    }
   ],
   "source": [
    "!kubectl apply -f tiller-role-binding.yaml"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Once that is set-up we can install Tiller"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!helm repo update"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "$HELM_HOME has been configured at /home/alejandro/.helm.\n",
      "\n",
      "Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.\n",
      "\n",
      "Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.\n",
      "To prevent this, run `helm init` with the --tiller-tls-verify flag.\n",
      "For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation\n",
      "Happy Helming!\n"
     ]
    }
   ],
   "source": [
    "!helm init --service-account tiller"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "deployment \"tiller-deploy\" successfully rolled out\r\n"
     ]
    }
   ],
   "source": [
    "# Wait until Tiller finishes\n",
    "!kubectl rollout status deploy/tiller-deploy -n kube-system"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Now we can install SELDON. \n",
    "We first start with the custom resource definitions (CRDs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "NAME:   seldon-core-operator\n",
      "LAST DEPLOYED: Thu Jun  6 12:03:45 2019\n",
      "NAMESPACE: default\n",
      "STATUS: DEPLOYED\n",
      "\n",
      "RESOURCES:\n",
      "==> v1/ClusterRole\n",
      "NAME                          AGE\n",
      "seldon-operator-manager-role  3s\n",
      "\n",
      "==> v1/ClusterRoleBinding\n",
      "NAME                                 AGE\n",
      "seldon-operator-manager-rolebinding  3s\n",
      "\n",
      "==> v1/Pod(related)\n",
      "NAME                                  READY  STATUS   RESTARTS  AGE\n",
      "seldon-operator-controller-manager-0  1/1    Running  0         3s\n",
      "\n",
      "==> v1/Secret\n",
      "NAME                                   TYPE    DATA  AGE\n",
      "seldon-operator-webhook-server-secret  Opaque  4     3s\n",
      "\n",
      "==> v1/Service\n",
      "NAME                                        TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)  AGE\n",
      "seldon-operator-controller-manager-service  ClusterIP  10.0.224.128  <none>       443/TCP  3s\n",
      "\n",
      "==> v1/StatefulSet\n",
      "NAME                                READY  AGE\n",
      "seldon-operator-controller-manager  1/1    3s\n",
      "\n",
      "==> v1beta1/CustomResourceDefinition\n",
      "NAME                                         AGE\n",
      "seldondeployments.machinelearning.seldon.io  3s\n",
      "\n",
      "\n",
      "NOTES:\n",
      "NOTES: TODO\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "!helm install seldon-core-operator --name seldon-core-operator --repo https://storage.googleapis.com/seldon-charts --set usageMetrics.enabled=true"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And confirm they are running by getting the pods:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "partitioned roll out complete: 1 new pods have been updated...\r\n"
     ]
    }
   ],
   "source": [
    "!kubectl rollout status deploy/seldon-controller-manager -n seldon-system"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Now we set-up the ingress\n",
    "This will allow you to reach the Seldon models from outside the kubernetes cluster. \n",
    "\n",
    "In EKS it automatically creates an Elastic Load Balancer, which you can configure from the EC2 Console"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Error: release ambassador failed: serviceaccounts \"ambassador\" already exists\r\n"
     ]
    }
   ],
   "source": [
    "!helm install stable/ambassador --name ambassador --set crds.keep=false"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And let's wait until it's fully deployed"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "deployment \"ambassador\" successfully rolled out\r\n"
     ]
    }
   ],
   "source": [
    "!kubectl rollout status deployment.apps/ambassador"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Push docker image\n",
    "In order for the EKS seldon deployment to access the image we just built, we need to push it to the Azure Container Registry (ACR) - you can check if it's been successfully created in the dashboard https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.ContainerRegistry%2Fregistries\n",
    "\n",
    "If you have any issues please follow the official Azure documentation: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-azure-cli"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### First we create a registry\n",
    "Make sure you keep the `loginServer` value in the output dictionary as we'll use it below."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[K{- Finished ..\n",
      "  \"adminUserEnabled\": false,\n",
      "  \"creationDate\": \"2019-06-06T10:51:55.288108+00:00\",\n",
      "  \"id\": \"/subscriptions/df7969cc-8033-4c83-b027-14c0424f039d/resourceGroups/KlawClusterResourceGroup/providers/Microsoft.ContainerRegistry/registries/SeldonContainerRegistry\",\n",
      "  \"location\": \"westus\",\n",
      "  \"loginServer\": \"seldoncontainerregistry.azurecr.io\",\n",
      "  \"name\": \"SeldonContainerRegistry\",\n",
      "  \"networkRuleSet\": null,\n",
      "  \"provisioningState\": \"Succeeded\",\n",
      "  \"resourceGroup\": \"KlawClusterResourceGroup\",\n",
      "  \"sku\": {\n",
      "    \"name\": \"Basic\",\n",
      "    \"tier\": \"Basic\"\n",
      "  },\n",
      "  \"status\": null,\n",
      "  \"storageAccount\": null,\n",
      "  \"tags\": {},\n",
      "  \"type\": \"Microsoft.ContainerRegistry/registries\"\n",
      "}\n",
      "\u001b[0m"
     ]
    }
   ],
   "source": [
    "!az acr create --resource-group SeldonResourceGroup --name SeldonContainerRegistry --sku Basic"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Make sure your local docker instance has access to the registry"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Login Succeeded\n",
      "WARNING! Your password will be stored unencrypted in /home/alejandro/.docker/config.json.\n",
      "Configure a credential helper to remove this warning. See\n",
      "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n",
      "\n"
     ]
    }
   ],
   "source": [
    "!az acr login --name SeldonContainerRegistry"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Now prepare docker image\n",
    "We need to first tag the docker image before we can push it.\n",
    "\n",
    "NOTE: if you named your registry different make sure you change the value of `seldoncontainerregistry.azurecr.io`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "!docker tag deep-mnist:0.1 seldoncontainerregistry.azurecr.io/deep-mnist:0.1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### And push the image\n",
    "\n",
    "NOTE: if you named your registry different make sure you change the value of `seldoncontainerregistry.azurecr.io`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The push refers to repository [seldoncontainerregistry.azurecr.io/deep-mnist]\n",
      "\n",
      "\u001b[1Bb4fe3076: Preparing \n",
      "\u001b[1Be4a983d1: Preparing \n",
      "\u001b[1B74b2c556: Preparing \n",
      "\u001b[1B9472b523: Preparing \n",
      "\u001b[1Ba2a7ea60: Preparing \n",
      "\u001b[1Beddb328a: Preparing \n",
      "\u001b[1B1393f8e7: Preparing \n",
      "\u001b[1B67d6e30e: Preparing \n",
      "\u001b[1Bf19da2c9: Preparing \n",
      "\u001b[1B9ec591c4: Preparing \n",
      "\u001b[1B32b1ff99: Preparing \n",
      "\u001b[1B64f96dbc: Preparing \n",
      "\u001b[1Be6d76fd9: Preparing \n",
      "\u001b[1B11a84ad4: Preparing \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[13B4b2c556: Pushing  187.1MB/648.8MB\u001b[14A\u001b[1K\u001b[K\u001b[12A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[14A\u001b[1K\u001b[K\u001b[12A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[15A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[9A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[8A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[10A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[11A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[KPushing   28.9MB/648.8MB\u001b[6A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[6A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[7A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[KPushing  60.12MB/141.8MB\u001b[4A\u001b[1K\u001b[KPushing  60.64MB/141.8MB\u001b[7A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[3A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[KPushing  141.9MB\u001b[2A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[4A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[KPushing  185.5MB/648.8MB\u001b[5A\u001b[1K\u001b[K"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[5B32b1ff99: Pushed   570.6MB/556.5MB\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[KPushing  254.7MB/556.5MB\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[KPushing  268.7MB/648.8MB\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[2A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[KPushing  6.456MB/100.6MB\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[KPushing  345.2MB/648.8MB\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[KPushing  398.1MB/648.8MB\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[KPushing  55.64MB/100.6MB\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[KPushing  481.1MB/648.8MB\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[KPushing  473.8MB/556.5MB\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[13A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[1A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K\u001b[5A\u001b[1K\u001b[K0.1: digest: sha256:b6110da62719e103bfd8c4b187f868b4341c35be16d288018d529da1cfa2585c size: 3482\n"
     ]
    }
   ],
   "source": [
    "!docker push seldoncontainerregistry.azurecr.io/deep-mnist:0.1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Running the Model\n",
    "We will now run the model. As you can see we have a placeholder `\"REPLACE_FOR_IMAGE_AND_TAG\"`, which we'll replace to point to our registry.\n",
    "\n",
    "Let's first have a look at the file we'll be using to trigger the model:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{\r\n",
      "    \"apiVersion\": \"machinelearning.seldon.io/v1alpha2\",\r\n",
      "    \"kind\": \"SeldonDeployment\",\r\n",
      "    \"metadata\": {\r\n",
      "        \"labels\": {\r\n",
      "            \"app\": \"seldon\"\r\n",
      "        },\r\n",
      "        \"name\": \"deep-mnist\"\r\n",
      "    },\r\n",
      "    \"spec\": {\r\n",
      "        \"annotations\": {\r\n",
      "            \"project_name\": \"Tensorflow MNIST\",\r\n",
      "            \"deployment_version\": \"v1\"\r\n",
      "        },\r\n",
      "        \"name\": \"deep-mnist\",\r\n",
      "        \"oauth_key\": \"oauth-key\",\r\n",
      "        \"oauth_secret\": \"oauth-secret\",\r\n",
      "        \"predictors\": [\r\n",
      "            {\r\n",
      "                \"componentSpecs\": [{\r\n",
      "                    \"spec\": {\r\n",
      "                        \"containers\": [\r\n",
      "                            {\r\n",
      "                                \"image\": \"REPLACE_FOR_IMAGE_AND_TAG\",\r\n",
      "                                \"imagePullPolicy\": \"IfNotPresent\",\r\n",
      "                                \"name\": \"classifier\",\r\n",
      "                                \"resources\": {\r\n",
      "                                    \"requests\": {\r\n",
      "                                        \"memory\": \"1Mi\"\r\n",
      "                                    }\r\n",
      "                                }\r\n",
      "                            }\r\n",
      "                        ],\r\n",
      "                        \"terminationGracePeriodSeconds\": 20\r\n",
      "                    }\r\n",
      "                }],\r\n",
      "                \"graph\": {\r\n",
      "                    \"children\": [],\r\n",
      "                    \"name\": \"classifier\",\r\n",
      "                    \"endpoint\": {\r\n",
      "\t\t\t\"type\" : \"REST\"\r\n",
      "\t\t    },\r\n",
      "                    \"type\": \"MODEL\"\r\n",
      "                },\r\n",
      "                \"name\": \"single-model\",\r\n",
      "                \"replicas\": 1,\r\n",
      "\t\t\"annotations\": {\r\n",
      "\t\t    \"predictor_version\" : \"v1\"\r\n",
      "\t\t}\r\n",
      "            }\r\n",
      "        ]\r\n",
      "    }\r\n",
      "}\r\n"
     ]
    }
   ],
   "source": [
    "!cat deep_mnist.json"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now let's trigger seldon to run the model.\n",
    "\n",
    "### Run the deployment in your cluster\n",
    "\n",
    "NOTE: In order for this to work you need to make sure that your cluster has the permissions to pull the images. You can do this by:\n",
    "\n",
    "1) Go into the Azure Container Registry\n",
    "\n",
    "2) Select the SeldonContainerRegistry you created\n",
    "\n",
    "3) Click on \"Add a role assignment\"\n",
    "\n",
    "4) Select the AcrPull role\n",
    "\n",
    "5) Select service principle\n",
    "\n",
    "6) Find the SeldonCluster\n",
    "\n",
    "7) Wait until the role has been added\n",
    "\n",
    "We basically have a yaml file, where we want to replace the value \"REPLACE_FOR_IMAGE_AND_TAG\" for the image you pushed"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "seldondeployment.machinelearning.seldon.io/deep-mnist created\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "# Change accordingly if your registry is called differently\n",
    "sed 's|REPLACE_FOR_IMAGE_AND_TAG|seldoncontainerregistry.azurecr.io/deep-mnist:0.1|g' deep_mnist.json | kubectl apply -f -"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And let's check that it's been created.\n",
    "\n",
    "You should see an image called \"deep-mnist-single-model...\".\n",
    "\n",
    "We'll wait until STATUS changes from \"ContainerCreating\" to \"Running\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!kubectl get pods"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Test the model\n",
    "Now we can test the model, let's first find out what is the URL that we'll have to use:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "52.160.64.65"
     ]
    }
   ],
   "source": [
    "!kubectl get svc ambassador -o jsonpath='{.status.loadBalancer.ingress[0].ip}'  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We'll use a random example from our dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "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\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Expected label:  7.0 . One hot encoding:  [[0. 0. 0. 0. 0. 0. 0. 1. 0. 0.]]\n"
     ]
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "# This is the variable that was initialised at the beginning of the file\n",
    "i = [0]\n",
    "x = mnist.test.images[i]\n",
    "y = mnist.test.labels[i]\n",
    "plt.imshow(x.reshape((28, 28)), cmap='gray')\n",
    "plt.show()\n",
    "print(\"Expected label: \", np.sum(range(0,10) * y), \". One hot encoding: \", y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can now add the URL above to send our request:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Success:True message:\n",
      "Request:\n",
      "data {\n",
      "  names: \"text\"\n",
      "  ndarray {\n",
      "    values {\n",
      "      list_value {\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.3294117748737335\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7254902124404907\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.6235294342041016\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.5921568870544434\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.2352941334247589\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.1411764770746231\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8705883026123047\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9450981020927429\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7764706611633301\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.6666666865348816\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.2039215862751007\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.26274511218070984\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.44705885648727417\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.2823529541492462\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.44705885648727417\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.6392157077789307\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8901961445808411\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8823530077934265\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9803922176361084\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8980392813682556\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.5490196347236633\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.06666667014360428\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.25882354378700256\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.05490196496248245\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.26274511218070984\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.26274511218070984\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.26274511218070984\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.23137256503105164\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.08235294371843338\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9254902601242065\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.41568630933761597\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.32549020648002625\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9921569228172302\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8196079134941101\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.07058823853731155\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.08627451211214066\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9137255549430847\n",
      "        }\n",
      "        values {\n",
      "          number_value: 1.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.32549020648002625\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.5058823823928833\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9333333969116211\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.1725490242242813\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.23137256503105164\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9764706492424011\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.24313727021217346\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.5215686559677124\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7333333492279053\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.019607843831181526\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.03529411926865578\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.803921639919281\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9725490808486938\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.22745099663734436\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.4941176772117615\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7137255072593689\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.29411765933036804\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9843137860298157\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9411765336990356\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.22352942824363708\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.07450980693101883\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8666667342185974\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.6509804129600525\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.011764707043766975\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.7960785031318665\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8588235974311829\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.13725490868091583\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.14901961386203766\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.3019607961177826\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.12156863510608673\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8784314393997192\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.45098042488098145\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.003921568859368563\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.5215686559677124\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.2039215862751007\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.2392157018184662\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9490196704864502\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.2039215862751007\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.4745098352432251\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8588235974311829\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.1568627506494522\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.4745098352432251\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9960784912109375\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.8117647767066956\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.07058823853731155\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.0\n",
      "        }\n",
      "      }\n",
      "    }\n",
      "  }\n",
      "}\n",
      "\n",
      "Response:\n",
      "meta {\n",
      "  puid: \"hndttmvl5qua3beavsre2n8hrj\"\n",
      "  requestPath {\n",
      "    key: \"classifier\"\n",
      "    value: \"seldoncontainerregistry.azurecr.io/deep-mnist:0.1\"\n",
      "  }\n",
      "}\n",
      "data {\n",
      "  names: \"class:0\"\n",
      "  names: \"class:1\"\n",
      "  names: \"class:2\"\n",
      "  names: \"class:3\"\n",
      "  names: \"class:4\"\n",
      "  names: \"class:5\"\n",
      "  names: \"class:6\"\n",
      "  names: \"class:7\"\n",
      "  names: \"class:8\"\n",
      "  names: \"class:9\"\n",
      "  ndarray {\n",
      "    values {\n",
      "      list_value {\n",
      "        values {\n",
      "          number_value: 6.386729364749044e-05\n",
      "        }\n",
      "        values {\n",
      "          number_value: 7.228476039955467e-09\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.00015463074669241905\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.00286240060813725\n",
      "        }\n",
      "        values {\n",
      "          number_value: 2.6505524601816433e-06\n",
      "        }\n",
      "        values {\n",
      "          number_value: 2.7261585273663513e-05\n",
      "        }\n",
      "        values {\n",
      "          number_value: 2.7168187699544433e-08\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.9966427087783813\n",
      "        }\n",
      "        values {\n",
      "          number_value: 1.9810671801678836e-05\n",
      "        }\n",
      "        values {\n",
      "          number_value: 0.00022661285765934736\n",
      "        }\n",
      "      }\n",
      "    }\n",
      "  }\n",
      "}\n",
      "\n"
     ]
    }
   ],
   "source": [
    "from seldon_core.seldon_client import SeldonClient\n",
    "import math\n",
    "import numpy as np\n",
    "\n",
    "host = \"52.160.64.65\"\n",
    "port = \"80\" # Make sure you use the port above\n",
    "batch = x\n",
    "payload_type = \"ndarray\"\n",
    "\n",
    "sc = SeldonClient(\n",
    "    gateway=\"ambassador\", \n",
    "    ambassador_endpoint=host + \":\" + port,\n",
    "    namespace=\"default\",\n",
    "    oauth_key=\"oauth-key\", \n",
    "    oauth_secret=\"oauth-secret\")\n",
    "\n",
    "client_prediction = sc.predict(\n",
    "    data=batch, \n",
    "    deployment_name=\"deep-mnist\",\n",
    "    names=[\"text\"],\n",
    "    payload_type=payload_type)\n",
    "\n",
    "print(client_prediction)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Let's visualise the probability for each label\n",
    "It seems that it correctly predicted the number 7"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "LABEL 0:\t 0.0064 %\n",
      "LABEL 1:\t 0.0000 %\n",
      "LABEL 2:\t 0.0155 %\n",
      "LABEL 3:\t 0.2862 %\n",
      "LABEL 4:\t 0.0003 %\n",
      "LABEL 5:\t 0.0027 %\n",
      "LABEL 6:\t 0.0000 %\n",
      "LABEL 7:\t 99.6643 %\n",
      "LABEL 8:\t 0.0020 %\n",
      "LABEL 9:\t 0.0227 %\n"
     ]
    }
   ],
   "source": [
    "for proba, label in zip(client_prediction.response.data.ndarray.values[0].list_value.ListFields()[0][1], range(0,10)):\n",
    "    print(f\"LABEL {label}:\\t {proba.number_value*100:6.4f} %\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
